<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template3.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="top">
        <h:form>
            [<h:commandLink action="#{filmController.previous}" value="Previous #{filmController.pageSize}" rendered="#{filmController.hasPreviousPage}"/>]
            [<h:commandLink action="#{filmController.next}" value="Next #{filmController.pageSize}" rendered="#{filmController.hasNextPage}"/>]
        </h:form>
    </ui:define>
    <ui:define name="left">
        left
    </ui:define>

    <ui:define name="content">

        <h:form>

            <h:dataTable value="#{filmController.filmTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Title"/>
                    </f:facet>
                    <h:outputText value="#{item.title}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Description"/>
                    </f:facet>
                    <h:outputText value="#{item.description}"/>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value=" "/>
                    </f:facet>
                    <h:commandLink action="#{filmController.prepareView}" value="View"/>
                </h:column>
            </h:dataTable>
            <br/>
        </h:form>

    </ui:define>

</ui:composition>
